import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_dk_form/flutter_dk_form.dart';

class NavigationBarDemoPage extends StatelessWidget {
  static const String routeName = '/page/navigation_bar_demo';
  static const String name = "NavigationBarDemoPage";

  @override
  Widget build(BuildContext context) {
    List<NavigationBarBean> itemList = List();
    itemList.add(NavigationBarBean(id:"1", title: "添加成员"));
    itemList.add(NavigationBarBean(id:"2", title: "锁定会议"));
    itemList.add(NavigationBarBean(id:"3", title: "修改布局", iconPath: "packages/flutter_dk_form/images/dk_form/navigation_bar_menu.png"));
    return Scaffold(
      appBar: AppBar(
        title: Text("NavigationBarDemoPage"),
      ),
      body: SingleChildScrollView(
          child: Container(
        color: Color(0xFFFF7F7F7),
        child: Column(
          children: <Widget>[
            NavigationBarWidget(
              title: "我的客户",
//              rightText: '撤销工单',
              rightWidget: Text(
                "撤销工单",
                style:
                TextStyle(color: Color(0xFF999999), fontSize: 14),
              ),
              backClickListener: (){
                print('back');
              },
              rightWidgetClickListener: (){
                print('rightTextClick');
              },
                itemList: itemList,
            ),
          ],
        ),
      )),
    );
  }
}
